var dsq;
function test(){
  dsq = setTimeout(function(){
    console.log("hello world");
  },3000);
}
function test2(){
  clearTimeout(dsq);
}

function changeImg(){
  window.setTimeout(a,3000);
}
var i=1;
function a(){
  i++;
  if(i>2){
    i=1;
  }
  var imgObj = document.getElementById("myImg");
  imgObj.src="img/"+i+".png";
  setTimeout(a,3000);
}

function test3(){
  window.location.href = "http://www.baidu.com";
}

function submitForm(){
  document.getElementById("myForm").submit();
}